package com.ruoyi.web.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.utils.serializer.BigDecimalToPlainStringSerializer;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * vip押金明细对象 vip_deposit_detail
 *
 * @date 2023-03-26
 */
@Data
public class VipDepositDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 金额
     */
    @Excel(name = "金额")
    @JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
    private BigDecimal amount;

    /**
     * 过期天数
     */
    @Excel(name = "过期天数")
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer expireDay;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 状态（0不可提现、1可提现）
     */
    @Excel(name = "状态", readConverterExp = "0=不可提现、1可提现")
    private String status;

    /**
     * 是否删除（0否、null是）
     */
    @Excel(name = "是否删除", readConverterExp = "0=否、null是")
    private String isDeleted;
}
